
***ANES 2016***

svyset [pweight=V160102]

*****************INDEPENDENT VARIABLES******************

*Gender

gen female=0
replace female=1 if V161342==2
label variable female "Female respondent"

gen male=0
replace male=1 if V161342==1
label variable male "Male respondent"

gen gender=.
replace gender=0 if male==1
replace gender=1 if female==1
label define gender 0 "Men" 1 "Women"
label values gender gender
label variable gender "Gender of Respondent"
tab gender

*Race

gen White=.
replace White=1 if V161310x==1
replace White=0 if V161310x!=1 & V161310x>0
tab White

*Feminist ID

gen feministsft=V162096/100 if V162096<101&V162096>=0
label variable feministsft "R's rating of feminists"

gen feministID=.
replace feministID=1 if V161345==1
replace feministID=.5 if V161345==2
replace feministID=0 if V161345==3
label variable feministID "R considers herself a feminist"

gen feminist=.
replace feminist=1 if V161346==1
replace feminist=.75 if V161346==2
replace feminist=.5 if V161346==3
replace feminist=.25 if V161346==4
replace feminist=0 if V161346==5
label variable feminist "R describes herself as a feminist"

gen feministimp=.
replace feministimp=1 if V161347==1
replace feministimp=.75 if V161347==2
replace feministimp=.5 if V161347==3
replace feministimp=.25 if V161347==4
replace feministimp=0 if V161347==5
label variable feministimp "R finds being a feminist important"

alpha feministsft feministID feminist feministimp, gen (feministidscale_4item)

*Modern sexism

gen specialfavors=.
replace specialfavors=0 if V162232==5
replace specialfavors=.25 if V162232==4
replace specialfavors=.5 if V162232==3
replace specialfavors=.75 if V162232==2
replace specialfavors=1 if V162232==1
label variable specialfavors "R agrees that women demanding equality seek special favors"

gen mediaattndisc=.
replace mediaattndisc =0 if V162231x==1
replace mediaattndisc =.167 if V162231x==2
replace mediaattndisc =.333 if V162231x==3
replace mediaattndisc =.5 if V162231x==4
replace mediaattndisc =.667 if V162231x==5
replace mediaattndisc =.833 if V162231x==6
replace mediaattndisc =1 if V162231x==7
label variable mediaattndisc "R agrees that media should pay less attention to discrimination against women"

gen harassment=.
replace harassment=0 if V162233==5
replace harassment=.25 if V162233==4
replace harassment=.5 if V162233==3
replace harassment=.75 if V162233==2
replace harassment=1 if V162233==1
label variable harassment "R agrees that women complaining about discrimination cause more problems"

alpha specialfavors mediaattndisc harassment, gen (modernsexism)
label variable modernsexism "Modern Sexism"

*Racial resentment

gen rr1=.
replace rr1=0 if V162211==5
replace rr1=.25 if V162211==4
replace rr1=.5 if V162211==3
replace rr1=.75 if V162211==2
replace rr1=1 if V162211==1
label var rr1 "Blacks should work their way up without special favors"

gen rr2=.
replace rr2=0 if V162212==1
replace rr2=.25 if V162212==2
replace rr2=.5 if V162212==3
replace rr2=.75 if V162212==4
replace rr2=1 if V162212==5
label var rr2 "Generations of slavery have made it difficult for blacks to succeed"

gen rr3=.
replace rr3=0 if V162213==1
replace rr3=.25 if V162213==2
replace rr3=.5 if V162213==3
replace rr3=.75 if V162213==4
replace rr3=1 if V162213==5
label var rr3 "Blacks have gotten less than they deserve"

gen rr4=.
replace rr4=0 if V162214==5
replace rr4=.25 if V162214==4
replace rr4=.5 if V162214==3
replace rr4=.75 if V162214==2
replace rr4=1 if V162214==1
label var rr4 "Blacks should try harder to succeed"

alpha rr1 rr2 rr3 rr4, gen(raceres)

*Authoritarianism

gen Auth1=.
replace Auth1=0 if V162239==1
replace Auth1=1 if V162239==2
tab Auth1

gen Auth2=.
replace Auth2=0 if V162241==2
replace Auth2=1 if V162241==1
tab Auth2

gen Auth3=.
replace Auth3=0 if V162240==1
replace Auth3=1 if V162240==2
tab Auth3

gen Auth4=.
replace Auth4=0 if V162242==1
replace Auth4=1 if V162242==2
tab Auth4

alpha Auth1 Auth2 Auth3 Auth4, gen(authoritarian)

*Party ID

gen partyid=.
replace partyid=0 if V161158x==1
replace partyid=.167 if V161158x==2
replace partyid=.333 if V161158x==3
replace partyid=.5 if V161158x==4
replace partyid=.667 if V161158x==5
replace partyid=.833 if V161158x==6
replace partyid=1 if V161158x==7
label variable partyid "Party ID, Strong Rep=1"

gen partyid_3cat=.
replace partyid_3cat=0 if partyid<.5&partyid>=0
replace partyid_3cat=.5 if partyid==.5
replace partyid_3cat=1 if partyid>.5&partyid<=1
tab partyid_3cat

*Party ID dummies (Independent is the excluded category)

gen partyID_rep=.
replace partyID_rep=1 if partyid_3cat==1
replace partyID_rep=0 if partyid_3cat!=1
tab partyID_rep

gen partyID_dem=.
replace partyID_dem=1 if partyid_3cat==0
replace partyID_dem=0 if partyid_3cat!=0
tab partyID_dem

*Ideology

gen ideol=.
replace ideol=0 if V161126==1
replace ideol=.167 if V161126==2
replace ideol=.333 if V161126==3
replace ideol=.5 if V161126==4 
replace ideol=.667 if V161126==5
replace ideol=.833 if V161126==6
replace ideol=1 if V161126==7
label variable ideol "Ideology, Strong Conservative=1"

*Employment status

gen working=.
replace working=1 if V161276x==1
replace working=0 if V161276x!=1
tab working

*Marital status

gen married=.
replace married=1 if V161268==1 | V161268==2
replace married=0 if V161268!=1 & V161268!=2
tab married

*Number of children under 18

gen kidsunder18=.
replace kidsunder18=0 if V161324==0
replace kidsunder18=1 if V161324==1
replace kidsunder18=2 if V161324==2
replace kidsunder18=3 if V161324==3
replace kidsunder18=4 if V161324==4
replace kidsunder18=5 if V161324==5
replace kidsunder18=6 if V161324==6
replace kidsunder18=7 if V161324==7
replace kidsunder18=8 if V161324==9
replace kidsunder18=kidsunder18/8
tab kidsunder18

*Age

gen ageN=.
replace ageN=V161267/100 if V161267>=18 & V161267<=90
tab ageN

*Education

gen education=V161270
replace education=. if V161270==-9 | V161270==-8 | V161270==90 | V161270==95
replace education=(education-1)/15 if V161270<17
label variable education "Education"

*Income

gen income=V161361x
replace inc=. if V161361x==-9 | V161361x==-5
replace income = (income-1)/27
label variable income "Income"

egen incomeavg=mean(income)
label variable incomeavg "Average income in year"

gen income_norm=.
replace income_norm=income/incomeavg
label variable income_norm "Normalized income - individual / average income in year"

gen income_norm01=.
replace income_norm01=income_norm/1.876717
label variable income_norm01 "Normalized income recoded 0 to 1"

*Born-again Christianity

gen bornagain=.
replace bornagain=1 if V161263==1
replace bornagain=0 if V161263==2


******************DEPENDENT VARIABLES*********************

*Intention to vote for Trump (pre-election)

gen voteintent_rep=.
replace voteintent_rep=0 if V161031==1 | V161031==3 | V161031==4 | V161031==5
replace voteintent_rep=1 if V161031==2
label var voteintent_rep "Intention to vote for Trump"

*Intention to vote for Clinton (pre-election)

gen voteintent_dem=.
replace voteintent_dem=0 if V161031==2 | V161031==3 | V161031==4 | V161031==5
replace voteintent_dem=1 if V161031==1
label var voteintent_dem "Intention to vote for Clinton"

*Self-reported vote for Trump (post-election)

gen voted_rep=.
replace voted_rep=0 if V162062x==1 | V162062x==3 | V162062x==4 | V162062x==5
replace voted_rep=1 if V162062x==2
label var voted_rep "Voted for Trump"

*Self-reported vote for Clinton (post-election)

gen voted_dem=.
replace voted_dem=0 if V162062x==2 | V162062x==3 | V162062x==4 | V162062x==5
replace voted_dem=1 if V162062x==1
label var voted_dem "Voted for Clinton"


*********************ANALYSIS****************************

*Cross-tab

tab feministID gender [aw=V160101], col

*Correlation

pwcorr feministidscale_4item modernsexism [aweight=V160102], sig


*Table 3

svy: logit voted_dem feministidscale_4item modernsexism gender White partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain
svy: logit voted_dem feministidscale_4item modernsexism White partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1
svy: logit voted_dem feministidscale_4item modernsexism White partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==0


**Probability shifts**

*All
svy: logit voted_dem feministidscale_4item modernsexism gender partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain, nolog
adjust feministidscale_4item=0 modernsexism gender partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain, pr
adjust feministidscale_4item=1 modernsexism gender partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain, pr

svy: logit voted_dem feministidscale_4item modernsexism gender partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain, nolog
adjust modernsexism=0 feministidscale_4item gender partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain, pr
adjust modernsexism=1 feministidscale_4item gender partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain, pr

*By gender
svy: logit voted_dem feministidscale_4item modernsexism partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1, nolog
adjust feministidscale_4item=0 modernsexism partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1, pr
adjust feministidscale_4item=1 modernsexism partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1, pr

svy: logit voted_dem feministidscale_4item modernsexism partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==0, nolog
adjust feministidscale_4item=0 modernsexism partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==0, pr
adjust feministidscale_4item=1 modernsexism partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==0, pr

*By race
svy: logit voted_dem feministidscale_4item modernsexism partyid gender raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==1, nolog
adjust feministidscale_4item=0 modernsexism partyid gender raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==1, pr
adjust feministidscale_4item=1 modernsexism partyid gender raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==1, pr

svy: logit voted_dem feministidscale_4item modernsexism partyid gender raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==0, nolog
adjust feministidscale_4item=0 modernsexism partyid gender raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==0, pr
adjust feministidscale_4item=1 modernsexism partyid gender raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==0, pr


*Dem Women
svy: logit voted_dem feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==0, nolog
adjust feministidscale_4item=0 modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==0, pr
adjust feministidscale_4item=1 modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==0, pr

*Rep Women
svy: logit voted_dem feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==1, nolog
adjust feministidscale_4item=0 modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==1, pr
adjust feministidscale_4item=1 modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==1, pr


*Table 4

gen feministid_level=.
replace feministid_level=1 if feministidscale_4item<=.333
replace feministid_level=2 if feministidscale_4item<=.667 & feministidscale_4item>.333
replace feministid_level=3 if feministidscale_4item<=1 & feministidscale_4item>.667
label var feministid_level "Feminism quartiles"

label values feministid_level feministid_level
label def feministid_level 1 "Low Feminism", modify
label def feministid_level 2 "Medium Feminism", modify
label def feministid_level 3 "High Feminism", modify


gen sexism_level=.
replace sexism_level=1 if modernsexism<=.333
replace sexism_level=2 if modernsexism<=.667 & modernsexism>.333
replace sexism_level=3 if modernsexism<=1 & modernsexism>.667
label var sexism_level "Sexism quartiles"

label values sexism_level sexism_level
label def sexism_level 1 "Low Sexism", modify
label def sexism_level 2 "Medium Sexism", modify
label def sexism_level 3 "High Sexism", modify      

table feministid_level sexism_level [aw=V160102]  


*Figure 2

label values voted_dem voted_dem
label def voted_dem 1 "Clinton", modify
label def voted_dem 0 "Other Candidate", modify

svy: logit voted_dem feministidscale_4item modernsexism gender partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain, nolog
adjust gender partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain, by(feministid_level sexism_level) pr ci gen (predicted)
graph box predicted, over(sexism_level) over(feministid_level) scheme(plottig) ytitle("Predicted Probability of Clinton Vote") asyvars box(1, color(gs1)) box(2, color(gs4)) box(3, color(gs7))



***************************APPENDIX*************************************

*Table A26

svy: logit voted_dem feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==1&gender==1
svy: logit voted_dem feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==1&gender==0
svy: logit voted_dem feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==0&gender==1
svy: logit voted_dem feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==0&gender==0


*Table A27

svy: logit voted_dem feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==0
svy: logit voted_dem feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==0&partyid_3cat==0
svy: logit voted_dem feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==1
svy: logit voted_dem feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==0&partyid_3cat==1


*Table A28

svy: logit voted_dem feministidscale_4item modernsexism partyid ideol raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==1&gender==1
svy: logit voted_dem feministidscale_4item modernsexism partyid ideol raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==1&gender==0
svy: logit voted_dem feministidscale_4item modernsexism partyid ideol raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==0&gender==1
svy: logit voted_dem feministidscale_4item modernsexism partyid ideol raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==0&gender==0


*Table A29

svy: logit voted_dem feministidscale_4item modernsexism ideol White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==0
svy: logit voted_dem feministidscale_4item modernsexism ideol White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==0&partyid_3cat==0
svy: logit voted_dem feministidscale_4item modernsexism ideol White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==1
svy: logit voted_dem feministidscale_4item modernsexism ideol White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==0&partyid_3cat==1


*Table A30

svy: logit voteintent_dem feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==1&gender==1
svy: logit voteintent_dem feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==1&gender==0
svy: logit voteintent_dem feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==0&gender==1
svy: logit voteintent_dem feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==0&gender==0


*Table A31

svy: logit voteintent_dem feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==0
svy: logit voteintent_dem feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==0&partyid_3cat==0
svy: logit voteintent_dem feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==1
svy: logit voteintent_dem feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==0&partyid_3cat==1


*Table A32

svy: logit voted_rep feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==1&gender==1
svy: logit voted_rep feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==1&gender==0
svy: logit voted_rep feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==0&gender==1
svy: logit voted_rep feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==0&gender==0


*Table A33

svy: logit voted_rep feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==0
svy: logit voted_rep feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==0&partyid_3cat==0
svy: logit voted_rep feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==1
svy: logit voted_rep feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==0&partyid_3cat==1


*Table A34

svy: logit voteintent_rep feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==1&gender==1
svy: logit voteintent_rep feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==1&gender==0
svy: logit voteintent_rep feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==0&gender==1
svy: logit voteintent_rep feministidscale_4item modernsexism partyid raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if White==0&gender==0


*Table A35

svy: logit voteintent_rep feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==0
svy: logit voteintent_rep feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==0&partyid_3cat==0
svy: logit voteintent_rep feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==1&partyid_3cat==1
svy: logit voteintent_rep feministidscale_4item modernsexism White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain if gender==0&partyid_3cat==1


*Table A36

svy: logit voted_dem c.feministidscale_4item##i.gender modernsexism partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain
svy: logit voted_dem c.modernsexism##i.gender feministidscale_4item partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain
svy: logit voted_dem c.feministidscale_4item##i.partyID_rep c.feministidscale_4item##i.partyID_dem modernsexism gender White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain
svy: logit voted_dem c.modernsexism##i.partyID_rep c.modernsexism##i.partyID_dem feministidscale_4item gender White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain


*Wald tests

*Feminist ID by gender*
svy: logistic voted_dem c.feministidscale_4item##i.gender modernsexism partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain
testnl _b[feministidscale_4item#0.gender] = _b[feministidscale_4item#1.gender]

*Feminist ID by party ID dummies*
svy: logistic voted_dem c.feministidscale_4item##i.partyID_rep c.feministidscale_4item##i.partyID_dem modernsexism gender White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain
testnl _b[feministidscale_4item#1.partyID_rep] = _b[feministidscale_4item#1.partyID_dem]


*Modern sexism by gender*
svy: logistic voted_dem c.modernsexism##i.gender feministidscale_4item partyid White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain
testnl _b[modernsexism#0.gender] = _b[modernsexism#1.gender]

*Modern sexism by party ID dummies*
svy: logistic voted_dem c.modernsexism##i.partyID_rep c.modernsexism##i.partyID_dem feministidscale_4item gender White raceres authoritarian working married kidsunder18 ageN education income_norm01 bornagain
testnl _b[modernsexism#1.partyID_rep] = _b[modernsexism#1.partyID_dem] 

